<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  <base target="_self"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/web/style/layout.css" />
    <script type="text/javascript" src="<%=path %>/jqGrid/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="<%=path %>/jslib/jquery.validate.min.js"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/My97DatePicker/WdatePicker.js" defer="defer"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/jquery.form.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/additional-methods.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/demo.css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
    <c:if test="${requestScope.message!=null}">
		<script type="text/javascript">
 	 		     alert('<c:out value="${requestScope.message}"></c:out>');
 	 		     window.close();
 		</script>
	</c:if>
	
    <script type="text/javascript">
    var api = frameElement.api, W = api.opener;
    $().ready(function(){
    var htId = '${tequipment.equHtNo}';
    getHetong("undefined",htId);
    	$('#closeBtn').click(function(){
    		api.close();
		});
		
	});
	function getHetong(id,htId){
		jQuery.post("eqAction!getHetong.action?htId="+htId+"&equMainId="+id,
				{"type" : "notall"},
				callHetong,
				"json");
	 }
	 function callHetong(json){
		var sel = '${tequipment.equHtNo}';
			 $("#equHtNo").empty();
				var html = ''; 
				  $('#equHtNo').append(html);
				if(json!=''){
				$.each(json,function(entryindex,entry){
					if(sel==entry['id']){
						html = '<option value="'+entry['id']+'" selected="selected">' + entry['name'] + '</option>';
					}else{
						html = '<option value="'+entry['id']+'" >' + entry['name'] + '</option>';
					}
					$('#equHtNo').append(html);
				});
			}
	 }


   </script>
 	<style type="text/css">
 		body{
 			background:#ffffff; background-image:url(images/);
 		}
   		html{
		    overflow-x: hidden;
			overflow-y: hidden;
		}  	
		.formTableNew textarea{border: 1px solid #999;padding: 5px;width: 760px;-moz-border-radius: 3px;border-radius: 3px;margin-bottom: 5px;color: #666;background: url(../images/input_bg.gif) repeat-x top;}
   </style>
  </head>
  
  <body>
<form id="pageFrom" action="" enctype="multipart/form-data" method="post">
        <input type="hidden" id="flag" name="flag" />
  		<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5" class="formTableNew">
  		<input type="hidden" id="eid" name="tequipment.id" value="${tequipment.id }"/>
  			<tr>
  			  <td align="right">设备名称：</td>
  			  <td align="left">
  			    <input  type="text" readonly  id="equName" maxlength="50" name="tequipment.equName" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equName }" />
  			  </td>
  			  <td align="right">设备编号：</td>
  			  <td align="left">
  			    <input  type="text" readonly  id="equNo" maxlength="50" name="tequipment.equNo" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equNo }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">规格型号：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equGuge" maxlength="50" name="tequipment.equGuge" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equGuge }" />
  			  </td>
  			  <td align="right">出厂编号：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equCNo" maxlength="50" name="tequipment.equCNo" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equCNo }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">合同编号：</td>
  			  <td align="left">
  			 	<select   name="tequipment.equHtNo" id="equHtNo" class='fselect' disabled="disabled" class='easyui-validatebox'  style="border: 1px solid #999;padding: 5px;width: 250px;height:40px;" onkeydown="if(event.keyCode==8)return false;"></select>
  			  </td>
  			  <td align="right">购进日期（转固日期）：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equGjDate" maxlength="50" name="tequipment.equGjDate"  style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equGjDate }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">预计使用年限（年）：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equYjsynx" maxlength="50" name="tequipment.equYjsynx" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equYjsynx }" />
  			  </td>
  			  <td align="right">已经使用时间（月）：</td>
  			  <td align="left">
  			  	 <input  type="text"  readonly   id="equYjsysj" maxlength="50" name="tequipment.equYjsysj" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equYjsysj }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">货币类型：</td>
  			  <td align="left">
  			  	<select id="equHblx" class='fselect' disabled="disabled"  name="tequipment.equHblx" class='easyui-validatebox' style="border: 1px solid #999;padding: 5px;width:250px;height:25px;" >
 			      <option value="人民币" <s:if test="tequipment.equHblx=='人民币'">selected</s:if>>人民币</option>
			 	  <option value="美元" <s:if test="tequipment.equHblx=='美元'">selected</s:if>>美元</option>
			 	  <option value="欧元" <s:if test="tequipment.equHblx=='欧元'">selected</s:if>>欧元</option>
			 	  <option value="日元" <s:if test="tequipment.equHblx=='日元'">selected</s:if>>日元</option>
			 	  <option value="英镑" <s:if test="tequipment.equHblx=='英镑'">selected</s:if>>英镑</option>
			 	  <option value="港元" <s:if test="tequipment.equHblx=='港元'">selected</s:if>>港元</option>
			 	  <option value="加元" <s:if test="tequipment.equHblx=='加元'">selected</s:if>>加元</option>
			 	  <option value="卢布" <s:if test="tequipment.equHblx=='卢布'">selected</s:if>>卢布</option>
 			    </select>
  			  </td>
  			  <td align="right">合同价格：</td>
  			  <td align="left">
  			    <input  type="text" readonly    id="equHtjg" maxlength="50" name="tequipment.equHtjg" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equHtjg }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">税率(%)：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equShuilv" maxlength="50" name="tequipment.equShuilv" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equShuilv }" />
  			  </td>
  			  <td align="right">汇率：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equHuilv" maxlength="50" name="tequipment.equHuilv" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equHuilv }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">原值（元）：</td>
  			  <td align="left">
  			    <input  type="text" readonly    id="equYzhi" maxlength="50" name="tequipment.equYzhi" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equYzhi }" />
  			  </td>
  			  <td align="right">原值（万元）：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equYzw" maxlength="50" name="tequipment.equYzw" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equYzw }" />
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">净值（万元）：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equJzw" maxlength="50" name="tequipment.equJzw" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equJzw }" />
  			  </td>
  			  <td align="right">折旧（万元）：</td>
  			  <td align="left">
  			    <input  type="text"  readonly   id="equZjw" maxlength="50" name="tequipment.equZjw" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="${tequipment.equZjw }" />
  			  </td>
  			</tr>
 			<tr>
		    <td align="right"  >备注：</td>
		    <td colspan="3">
		    	<div class="div">
					<textarea rows="5"  readonly  cols="100" id="remark" name="tequipment.remark"  style="width: 720px;">${tequipment.remark }</textarea>
				</div>	
		    </td>
		  </tr>
		</table>
		<table width="100%" border="0" align="center" class="formTableNew">
		  <tr>
			<td align="center">
		    	<input id="saveBtn" type="button" value="提 交" class="form_bt_orange" />
		    	<input type="button" id="closeBtn" value="取 消" class="form_bt_grey" />
		    </td>
		  </tr>
		</table>
	<!--表单结束-->
	</form>
  </body>
</html>
